
obj-$(CONF_S3C2410) += s3c2410-plat.o
obj-$(CONF_S3C2440) += s3c2440-plat.o

OBJS_C = $(obj-y)
SRCS_C := $(OBJS_C:.o=.c)

OBJS_ASM = 
SRCS_ASM := $(OBJS_ASM:.o=.S)

SUBDIRS = 

SUB_BUILT_IN_OBJS := $(foreach n, $(SUBDIRS), $(n)/$(BUILT_IN_OBJ))

all : $(SUBDIRS) $(BUILT_IN_OBJ)

$(SUBDIRS): 
	@make -C $@ all

$(BUILT_IN_OBJ): $(SUB_BUILT_IN_OBJS) $(OBJS_ASM) $(OBJS_C)
	$(LD) -r $(LDFLAGS) -o $@ $^

$(OBJS_ASM): $(SRCS_ASM)
	$(CC) $(CFLAGS) -D__ASSEMBLY__ -c $(@:.o=.S)

$(OBJS_C): $(SRCS_C)
	$(CC) $(CFLAGS) -c $(@:.o=.c)

clean:
	@rm -vf *.o
